@extends('layouts.admin_iframe')
@section('content')

	@if(count($errors)>0)
		<div class="mark">
			@if(is_object($errors))
				@foreach($errors->all() as $key=>$error)
					@if($key==0)
						<p>{{$error}}</p>
					@endif
				@endforeach
			@else
				<p>{{$errors}}</p>
			@endif
		</div>
	@endif
	<form action="{{url('admin/attr/'.$attr_data->aid)}}" method="post">
		{{method_field('put')}}
		{{csrf_field()}}
		<input type="hidden" name="type_tid" value="{{$_GET['tid']}}">
		<div class="alert alert-success">编辑属性</div>
		<div class="form-group">
			<label for="exampleInputEmail1">属性名称</label>
			<input value="{{$attr_data->aname}}" id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入属性名称" required="" name="aname">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">属性类别</label>
			<select name="atype" class="form-control">
				<option @if($attr_data->atype=="属性") selected @endif value="属性">属性</option>
				<option @if($attr_data->atype=="规格") selected @endif value="规格">规格</option>
			</select>
		</div>



		<div class="form-group">
			<label for="exampleInputEmail1">属性值</label>
			<input value="{{$attr_data->avalue}}" id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入属性值" required="" name="avalue">
		</div>
		{{--<div class="form-group">--}}
			{{--<label for="exampleInputEmail1">分类关键字</label>--}}
			{{--<textarea name="" rows="5" cols=""  class="form-control" placeholder="请输入分类关键字"></textarea>--}}
		{{--</div>--}}
		{{--<div class="form-group">--}}
			{{--<label for="exampleInputEmail1">分类描述</label>--}}
			{{--<textarea name="" rows="5" cols=""  class="form-control" placeholder="请输入分类描述"></textarea>--}}
		{{--</div>--}}

	
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
	</form>
@endsection